package com.my.app.tools.util;

import java.text.SimpleDateFormat;
import java.util.Calendar;

public class LogUtil {

    private static final String logMsg = "| %s [%s] %s";

    public static void info(String msg) {
        System.out.println(String.format(logMsg, new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(Calendar.getInstance().getTime()), "INFO", msg));
    }

    public static void error(String msg) {
        System.err.println(String.format(logMsg, new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(Calendar.getInstance().getTime()), "ERROR", msg));
    }

}
